<?php namespace App\Http\Requests;

use App\Http\Requests\Request;

class CreateTaskRequest extends Request {

	/**
	 * Determine if the user is authorized to make this request.
	 *
	 * @return bool true:表示不需要认证，或者是通过认证
	 */
	public function authorize()
	{
		return true;
	}

	/**
	 * Get the validation rules that apply to the request.
	 *
	 * @return array
	 */
	public function rules()
	{
		return [
			//
			'name' => 'required|min:3',//名称必填
		    'context' => 'required',
			'times'=>'required',//工期必填
			'price' => 'required',//价格必须
		];
	}

}
